Skip to content

Remove blocking loop.exec write flow from ftmsbike - #4382

Merged
cagnulein merged 2 commits into
masterfrom
codex/remove-loop.exec-from-ftmsbike-class
Jul 1, 2026
Merged

Remove blocking loop.exec write flow from ftmsbike#4382
cagnulein merged 2 commits into
masterfrom
codex/remove-loop.exec-from-ftmsbike-class

Conversation

@cagnulein

Copy link
Copy Markdown
Owner

Motivation

  • Rimuovere il comportamento bloccante che usava QEventLoop::exec() nelle scritture BLE di ftmsbike per evitare loop annidati e blocchi simili a quanto già fatto per il treadmill Domyos.
  • Permettere operazioni di scrittura BLE non bloccanti mantenendo l’ordine delle scritture e una logica di fallback su timeout.

Description

  • Sostituito il flusso bloccante con una coda asincrona di scritture definita da WriteRequest e da metodi enqueueWrite, processWriteQueue e completeCurrentWrite in ftmsbike.
  • Aggiornate le funzioni writeCharacteristicZwiftPlay(...) e writeCharacteristic(...) per usare la coda invece di creare e bloccare con QEventLoop.
  • Aggiunta una QQueue<WriteRequest>, flag di stato (isWriting, currentWriteWaitingForResponse, currentWriteService) e un QTimer writeTimeoutTimer per avanzare la coda su timeout.
  • Integrata la completazione delle scritture con i callback esistenti: characteristicChanged completa le scritture che aspettano una risposta e characteristicWritten completa quelle che non aspettano risposta.

Testing

  • Ricerca automatica per loop.exec / QEventLoop su sorgente ftmsbike eseguita e non sono state trovate occorrenze, test superato.
  • Visualizzazione diff e controllo dello stato dei file modificati eseguiti con comandi automatici (git diff, git status) e hanno mostrato le modifiche attese, test superato.
  • Nessuna build automatica o test di integrazione eseguiti in questa modifica; il cambiamento è una ristrutturazione logica che richiede una build runtime per una verifica funzionale successiva.

Codex Task

@stale

stale Bot commented Mar 20, 2026

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the wontfix This will not be worked on label Mar 20, 2026
@stale stale Bot closed this Mar 27, 2026
@cagnulein cagnulein reopened this Mar 27, 2026
@stale stale Bot closed this Apr 3, 2026
@cagnulein cagnulein reopened this Apr 4, 2026
@stale stale Bot removed the wontfix This will not be worked on label Apr 4, 2026
@stale

stale Bot commented Apr 19, 2026

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the wontfix This will not be worked on label Apr 19, 2026
@stale stale Bot closed this Apr 28, 2026
@cagnulein cagnulein reopened this Apr 28, 2026
@stale stale Bot removed the wontfix This will not be worked on label Apr 28, 2026
@cagnulein
cagnulein marked this pull request as ready for review May 1, 2026 19:07
@stale

stale Bot commented May 16, 2026

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the wontfix This will not be worked on label May 16, 2026
@stale stale Bot closed this May 24, 2026
@cagnulein cagnulein reopened this May 24, 2026
@stale stale Bot removed the wontfix This will not be worked on label May 24, 2026
@cagnulein cagnulein mentioned this pull request Jun 8, 2026
@stale

stale Bot commented Jun 14, 2026

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the wontfix This will not be worked on label Jun 14, 2026
@stale stale Bot closed this Jun 23, 2026
@cagnulein cagnulein reopened this Jun 23, 2026
@stale stale Bot closed this Jun 30, 2026
@cagnulein cagnulein reopened this Jul 1, 2026
@stale stale Bot removed the wontfix This will not be worked on label Jul 1, 2026
@cagnulein

Copy link
Copy Markdown
Owner Author

rschumakerjr

@cagnulein cagnulein linked an issue Jul 1, 2026 that may be closed by this pull request
@cagnulein cagnulein added this to the 2.21 milestone Jul 1, 2026
@cagnulein
cagnulein merged commit 37a2c64 into master Jul 1, 2026
108 of 110 checks passed
@cagnulein
cagnulein deleted the codex/remove-loop.exec-from-ftmsbike-class branch July 1, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant